package com.itgt.renwu2;

import java.util.Scanner;

public class ForAvgScore {
	public static void main(String[] args) {
		int sum=0;
		int a=0;
		double avg=0;
		String over = null;
		Scanner scanner = new Scanner(System.in);
		System.out.println("输入姓名");
		String name = scanner.next();
		for(int i=0;i<5;i++) {
			System.out.println("输入"+(i+1)+"成绩");
			int score = scanner.nextInt();
			sum += score;
			a=i+1;
		}
		avg=sum/5;
			
		System.out.println("学生姓名："+name);
		System.out.println("共计科目："+a);
		System.out.println("总分成绩："+sum);
		System.out.println("平均成绩："+avg);
		System.out.println("是否继续？？(y/n)");
	}

}
